<div class="container">
	<h1>文章分类</h1>
	<p>
		<a href="{:U('admin/category/add')}" class="btn btn-primary">添加分类</a>
	</p>
	<empty name="list">
		<p>暂时没有分类</p>
		<else/>
		<div class="table-responsive">
			<table class="table table-bordered">
				<tr>
					<th>ID</th>
					<th>名称</th>
					<th>排序</th>
					<th>导航栏</th>
					<th>文章数</th>
					<th>编辑</th>
				</tr>
				<volist name="list" id="item">
					<tr>
						<td>{$item.categoryId}</td>
						<td>{$item.name}</td>
						<td>{$item.sort}</td>
						<td>
							<eq name="item.isNav" value="1">
								<span class="label label-success">显示</span>
								<else/>
								<span class="label label-default">不显示</span>
							</eq>
						</td>
						<td>{$item.total}</td>
						<td>
							<a href="{:U('admin/category/edit?id='.$item['categoryId'])}">编辑</a>
							<a href="{:U('admin/category/delete?id='.$item['categoryId'])}" onclick="return confirm('确定删除吗？')">删除</a>
						</td>
					</tr>
				</volist>
			</table>
		</div>
	</empty>
</div>